//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;
using OpenLS.Drawing.Serialization;

namespace OpenLS.Drawing.Media
{
    class AudioCD: MediaObject
    {
        private OfficeArtExtensionList extLst;
        private AudioCDTime st;
        private AudioCDTime end;
        internal const string xmlName = "audioCD";
        public override void ReadXml(ReadContext context)
        {
            using (var c = context.Read(DrawingConstants.DrawingNamespace + xmlName))
            {
                st = c.ReadElementAs<AudioCDTime>("st");
                end = c.ReadElementAs<AudioCDTime>("end");
                this.extLst = c.ReadOptionalElement<OfficeArtExtensionList>("extLst");
            }
        }

        public override void WriteXml(WriteContext context)
        {
            using (var c = context.Write(DrawingConstants.DrawingNamespace + xmlName))
            {
                c.WriteElementAs( st, "st");
                c.WriteElementAs(end , "end" );
                c.WriteOptionalElement(extLst);
            }
        }
    }
}